package com.ruoyi.common.exception.excel;

import com.ruoyi.common.model.excel.res.ExcelImportErrorData;
import com.ruoyi.common.model.excel.res.ExcelImportErrorRes;
import lombok.Data;

import java.util.List;
import java.util.Objects;

@Data
public class ExcelImportException extends RuntimeException {

    /** 编码 **/
    private int code = 490;

    /** 错误信息 **/
    private String message = "导入失败";

    /** 错误数据集合 **/
    private ExcelImportErrorRes data;

    public ExcelImportException(Integer totalAmount, List<ExcelImportErrorData> errorList) {
        this.data = new ExcelImportErrorRes(totalAmount, errorList.size(), errorList);
    }

}
